/**
 * Copyright (c) 2013 Axa Holding Belgium, SA. All rights reserved.
 * This software is the confidential and proprietary information of the AXA Group.
 */
package chabernac.android.chargemybattery.battery;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class BootReceiver extends BroadcastReceiver {

    @Override
    public void onReceive( Context aContext, Intent anIntent ) {
        Intent bootintent = new Intent( aContext, PowerSaveActionService.class );
        PendingIntent pi = PendingIntent.getService( aContext, 0, bootintent, PendingIntent.FLAG_UPDATE_CURRENT );

        AlarmManager FPAlarm = (AlarmManager) aContext.getSystemService( Context.ALARM_SERVICE );
        FPAlarm.setRepeating( AlarmManager.RTC, System.currentTimeMillis() + 1 * 1000, 5 * 1000, pi );
    }

}
